function countdown(time) {
    var now = +new Date();
    var inputtime = +new Date(time);
    var times = (now - inputtime) / 1000;
    var s = parseInt(times % 60) ;
    s = s < 10 ? '0' + s : s;
    var m = parseInt(times / 60 % 60) ;
    m = m < 10 ? '0' + m : m;
    var h = parseInt(times / 60 / 60 % 24) ;
    h = h < 10 ? '0' + h : h;
    var d = parseInt(times / 60 / 60 / 24) ;
    d = d < 10 ? '0' + d : d;
    return (d + '天' +'</br>'+ h + '时' + m + '分' + s + '秒 ');
}
var h3 = document.querySelector('.foot').querySelector('h3');
setInterval(() => {
    h3.innerHTML =countdown('2022-01-11 00:00:00');
}, 100);